package com.demonzym.http.api;

import com.demonzym.framework.net.http.HttpRequest;
import com.demonzym.framework.net.http.HttpResponse;
import com.demonzym.framework.net.task.AbstractHttpTask;

public class GetAlbumInfoTask extends AbstractHttpTask {
	
	private String ids;
	
	public GetAlbumInfoTask(String ids){
		this.ids = ids;
	}
	
	@Override
	public HttpRequest buildHttpRequest() {
		HttpRequest hr = new HttpRequest(ConstUrl.TUDOU_API_HOST);
		hr.addHttpParams("method", "album.info.get");
		hr.addHttpParams("appKey", ConstUrl.TUDOU_APPKEY);
		hr.addHttpParams("format", "json");
		hr.addHttpParams("ids", ids);
		return hr;
	}

	@Override
	protected String buildResponseObject(HttpResponse hr) {
		return new String(hr.data);
	}

	@Override
	protected int buildType() {
		return Api.GETPLAYLIST;
	}
}
